package vars

import (
	"gitee.com/csingo/cConfig"
	"gitee.com/csingo/cHelper"
)

var ConfigCenterConfig = &cConfig.ConfigCenterConf{
	Enable:   cHelper.EnvToBool("CONFIG_CENTER_ENABLE", true),
	Backup:   cHelper.EnvToBool("CONFIG_CENTER_BACKUP", false),
	Driver:   cConfig.ConfigCenterDriver(cHelper.EnvToString("CONFIG_CENTER_DRIVER", string(cConfig.FileDriver))),
	Interval: int64(cHelper.EnvToInt("CONFIG_CENTER_INTERVAL", 10)),
	Layers:   100,
	Clients: &cConfig.ConfigCenterConf_Clients{
		File: &cConfig.FileClient{
			Namespace: cHelper.EnvToString("APP_ENV", "default"),
			Path:      cHelper.EnvToString("CONFIG_CENTER_FILE_PATH", "C:\\Users\\Joe\\project\\gitee\\lieshou\\lieshou-management\\config\\etc"),
		},
		Zip: &cConfig.ZipClient{
			Namespace: cHelper.EnvToString("APP_ENV", "default"),
			Path:      "C:\\Users\\Joe\\project\\gitee\\lieshou\\lieshou-management\\config\\etc\\etc.zip",
			Password:  "123456",
		},
		Nacos: &cConfig.NacosClient{
			Scheme:    cHelper.EnvToString("NACOS_SCHEME", "http"),
			Host:      cHelper.EnvToString("NACOS_HOST", "test-nacos.qdtech.int"),
			Port:      uint64(cHelper.EnvToInt("NACOS_PORT", 8848)),
			Username:  cHelper.EnvToString("NACOS_USERNAME", "nacos"),
			Password:  cHelper.EnvToString("NACOS_PASSWORD", "nacos"),
			Namespace: cHelper.EnvToString("APP_ENV", "default"),
			Path:      cHelper.EnvToString("NACOS_URI_PATH", "/nacos"),
		},
	},
	Listens: []*cConfig.ConfigCenterConf_ListenItem{},
}
